<?php
	
class Table_Joue extends Zend_Db_Table_Abstract
{
    protected $_name    = 'joue';
    protected $_primary = 'FILM_NUMERO,VIP_NUMERO';
    protected $_sequence = FALSE;
 	
	public function insertJoue($numFilm, $numVip, $roleNom){
		$data = array('FILM_NUMERO' => $numFilm, 'VIP_NUMERO'=> $numVip,
		'ROLE_NOM' => $roleNom);
		$this->insert($data);
	}
	
	public function getFilmNum($idVip){
    	
        return $this->fetchRow($this
        	->select()
 			->where('VIP_NUMERO= ?', $idVip));		
    }
	
	
	public function supprJoue($id){
		$this->delete('VIP_NUMERO ='.(int)$id);
	}

	public function supprJoueByFilm($id){
		$this->delete('FILM_NUMERO ='.(int)$id);
	}
	
	
}